<h2>task_suspend</h2>
<hr>
<p>
<strong>Function</strong> - Suspend the target task.
<h3>SYNOPSIS</h3>
<pre>
<strong>kern_return_t   task_suspend</strong>
                <strong>(task_t</strong>          <var>task</var><strong>);</strong>
</pre>
<h3>PARAMETERS</h3>
<dl>
<p>
<dt> <var>task</var> 
<dd>
[in task send right]
The port for the task to be suspended.
</dl>
<h3>DESCRIPTION</h3>
<p>
The <strong>task_suspend</strong> function increments the suspend count
for task and stops all 
threads within the task.  As long as the suspend count is positive, 
no newly-created threads can execute.  The function does not return until all 
of the task's threads have been suspended.
<h3>NOTES</h3>
<p>
To resume a suspended task and its threads, use <strong>task_resume</strong>.
If the suspend 
count is greater than one, <strong>task_resume</strong> must be repeated
that number of times.
<h3>RETURN VALUES</h3>
<p>
Only generic errors apply.
<h3>RELATED INFORMATION</h3>
<p>
Functions:
<a href="task_create.html"><strong>task_create</strong></a>,
<a href="task_info.html"><strong>task_info</strong></a>,
<a href="task_resume.html"><strong>task_resume</strong></a>,
<a href="task_terminate.html"><strong>task_terminate</strong></a>,
<a href="thread_suspend.html"><strong>thread_suspend</strong></a>.
